package com.xdb.sqlparser.ast.statement;

import com.xdb.sqlparser.ast.SQLExpr;
import com.xdb.sqlparser.ast.AbstractSQLObjectImpl;
import com.xdb.sqlparser.visitor.SQLAstVisitor;

public class SQLAlterTableAlterColumn extends AbstractSQLObjectImpl implements SQLAlterTableItem {

	private SQLColumnDefinition column;

	private boolean setNotNull;

	private boolean dropNotNull;

	private SQLExpr setDefault;

	private boolean dropDefault;

	@Override
	protected void accept0(SQLAstVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, column);
			acceptChild(visitor, setDefault);
		}
		visitor.endVisit(this);
	}

	public SQLColumnDefinition getColumn() {
		return column;
	}

	public void setColumn(SQLColumnDefinition column) {
		this.column = column;
	}

	public boolean isSetNotNull() {
		return setNotNull;
	}

	public void setSetNotNull(boolean setNotNull) {
		this.setNotNull = setNotNull;
	}

	public boolean isDropNotNull() {
		return dropNotNull;
	}

	public void setDropNotNull(boolean dropNotNull) {
		this.dropNotNull = dropNotNull;
	}

	public SQLExpr getSetDefault() {
		return setDefault;
	}

	public void setSetDefault(SQLExpr setDefault) {
		this.setDefault = setDefault;
	}

	public boolean isDropDefault() {
		return dropDefault;
	}

	public void setDropDefault(boolean dropDefault) {
		this.dropDefault = dropDefault;
	}

}
